<h2 class="h2-title">Thêm tin tức !!!</h2>

<?php if(isset($msg) AND $msg != ''):?>
<ul class="notification err">
    <li class="notifi_img"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_circle.png"/></li>

    <li class="msg"><?=$msg?></li>

    <li class="close"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_grey_small.png"/></li>

</ul><!--End of .notification -->

<?php else:?>

<div class="form_input_index">
    <ul class="form_text">
    <form action="<?=base_url()?>backend/news/createnews"  method="POST">
        <li class="text_input">Tiêu đề</li>
        <li><input type="text" value="" name="news_title" class="input-post"/></li>
        <?= form_error('news_title','<li class="errors">','</li>'); ?>

        <li class="text_input">Tiêu đề không dấu <span style="color: #00A6DD;font-size:0.9em!important;">(*Ví dụ : Tin tức →  tin tuc)</span></li>
        <li><input type="text" value="" name="news_title_slug" class="input-post"/></li>
        <?= form_error('news_title_slug','<li class="errors">','</li>'); ?>

        <li class="text_input">Hình ảnh</li>
        <input type="text" value="" id="news_image" name="news_image" />
        <input type="hidden" value="" id="news_image_thumb" name="news_image_thumb" /><br /><br />
        <?= form_error('news_image','<li class="errors">','</li>'); ?>
        <?= form_error('news_image_thumb','<li class="errors">','</li>'); ?>
        <li id="newsthumbs"></li>

        <li class="text_input">Nội dung</li>
        <textarea class="ckeditor ck" style="width: 700px!important;height: 150px!important;color:#EA9533"  name="news_content"></textarea>
        <?= form_error('news_content','<li class="errors">','</li>'); ?>

        <li class="text_input">Loại tin tức</li>
        <select name="news_pages">
            <?php if(!empty($pages)):?>
                <?php foreach($pages as $page):?>
                    <option value="<?= $page->pages_id?>"><?=$page->pages_name?></option>
                <?php endforeach;?>
            <?php endif;?>
        </select>

        <li class="text_input">Trạng thái</li>
        <select name="news_status">
            <option value="1">Hiển thị</option>
            <option value="0">Ẩn</option>
        </select>

        <li class="text_input">Tin nổi bật</li>
        <select name="news_hightlight">
            <option value="0">Không</option>
            <option value="1">Có</option>
        </select>

        <div style="clear: both;"></div>
        <input type="submit" class="sub" value="Đồng ý" name="sub"/>
        <a href="<?=base_url()?>backend/news" class="bnt">Quay lại</a>
    </form>
    </ul>
</div>
<?php endif;?>